package com.example.mayn.secondmvp.presenter;

import com.example.mayn.secondmvp.model.utils.MainDownLoadUtil;
import com.example.mayn.secondmvp.view.IView;

public class MainPresenter implements IPresenter {
    private MainDownLoadUtil mainDownLoadUtil = new MainDownLoadUtil(this);
    private IView iView;

    public MainPresenter(IView iView) {
        this.iView = iView;
    }

    @Override
    public void setData2Presenter(String data) {
        iView.setData2View(data);
    }

    @Override
    public void setError2Presenter(String data) {
        iView.setErrorData2View(data);
    }

    public void LoadData() {
        mainDownLoadUtil.getMainList();
    }
}
